// 导入axios实例
import httpRequest from './index.js'

// 登录
export function apiLogin(data) {
    return httpRequest({
        url: "/user/login",
        method: "post",
        data: data,
    })
}

export function apiAllReports(data) {
    return httpRequest({
        url: "/table/all-tables",
        method: "post",
        data: data,
    })
}

export function apiEva(data) {
    return httpRequest({
        url: "/table/eva",
        method: "post",
        data: data,
    })
}

export function apiAnalysis_1(data) {
    return httpRequest({
        url: "/sens/analysis3",
        method: "post",
        data: data,
    })
}

export function apiAnalysis_2(data) {
    return httpRequest({
        url: "/sens/zbjjzsyl-sens",
        method: "post",
        data: data,
    })
}

export function apiGraph_1(data) {
    return httpRequest({
        url: "/sens/sens-graph",
        method: "post",
        data: data,
    })
}

export function apiGraph_2(data) {
    return httpRequest({
        url: "/sens/zbjjzsyl-graph",
        method: "post",
        data: data,
    })
}

export function apiGenerate(data) {
    return httpRequest({
        url: "/excel/generate",
        method: "post",
        data: data,
    })
}

export function apiGenerateWord(data, typ) {
    return httpRequest({
        url: "/excel/doc/generate/" + typ,
        method: "post",
        data: data,
    })
}

export function apiDownload(data) {
    return httpRequest({
        url: "/excel/download/" + data,
        method: "get",
        responseType: 'blob',
        data: data,
    })
}

export function apiProjectList(data) {
    return httpRequest({
        url: "/input/query/user-id",
        method: "post",
        data: data,
    })
}

export function apiProjectSave(data) {
    return httpRequest({
        url: "/input/save",
        method: "post",
        data: data,
    })
}

export function apiProjectUpdate(data) {
    return httpRequest({
        url: "/input/update",
        method: "post",
        data: data,
    })
}

export function apiProjectById(data) {
    return httpRequest({
        url: "/input/id",
        method: "post",
        params: data,
    })
}

export function apiProjectDel(data) {
    return httpRequest({
        url: "/input/remove",
        method: "post",
        params: data,
    })
}

export function apiUserUpdate(data) {
    return httpRequest({
        url: "/user/update",
        method: "post",
        data: data,
    })
}